package com.java_foundation.huawei.Test_10;

import java.util.Scanner;

/**
 * @program: java_foundation
 * @description: 写出一个程序，接受一个由字母和数字组成的字符串，和一个字符，然后输出输入字符串中含有该字符的个数。不区分大小写。
 * @author: xiongbangwen <Email>xiongbangwen@163.com</Email>
 * @create: 2020-08-02 23:55
 **/
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str1 = sc.nextLine().toUpperCase();
        String str2 = sc.nextLine().toUpperCase();
        int len = str1.length();
        int count = 0;
        for (int i = 0; i < len; i++) {
            Character c = str1.charAt(i);
            if (c.toString().equals(str2)) {
                ++count;
            }
        }
        System.out.println(count);
    }
}
